<template>
    <!-- 商品编号:{{ route.query.id }}<br>
    商品名称:{{ route.query.name }}<br>
    商品单价:{{ route.query.price }}<br> -->
    
    商品编号:{{ route.params.id }}<br>
    商品名称:{{ route.params.name }}<br>
    商品单价:{{ route.params.price }}<br>
</template>
<script setup>
import { useRoute } from 'vue-router';

const route = useRoute()
console.log(route)
</script>